package com.gph.saviorframework.wf.service.impl;

import com.gph.saviorframework.wf.service.ActivitiFormService;
import org.activiti.engine.FormService;
import org.activiti.engine.form.TaskFormData;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created by guopeihui on 2017/3/8.
 */
public class ActivitiFormServiceImpl implements ActivitiFormService {

    @Autowired
    private FormService formService;

    /**
     * 根据任务编号获取form key
     *
     * @param taskId
     * @return
     */
    @Override
    public String getFormKey(String taskId) {
        TaskFormData formData = formService.getTaskFormData(taskId);;
        String formKey = formData.getFormKey();
        return formKey;
    }
}
